
const state = {
  APPID: 'APP1eGHOa3N0002', 
  APPKEY: '73F6018BA136645E780AA81B0300E47D',
  REDIRECT_URI: 'https://cmcc.pjunjie.cc/oauth.html',

  expires_in: 0,
  token_type: 'bearer',
  access_token: '',
  refresh_token: '',

  // 当前目录id
  folderId: '',
};

const getters = {
  GET_ACCESSTOKEN: state => state.access_token,
  GET_REFRESHTOKEN: state => state.refresh_token,
  GET_FOLDERID: state => state.folderId
};

const mutations = {
  SAVE_ACCESSTOEKN (state, {expires_in, access_token, refresh_token}) {
      state.expires_in = expires_in;
      state.access_token = access_token;
      state.refresh_token = refresh_token;
  },
  SAVE_FOLDERID(state, id){
    state.folderId = id;
  }
};

const actions = {

};


export default {
  state,
  mutations,
  getters,
  actions
}